import React from 'react';
import {Card,Button,message} from 'antd';
import './ui.less';

export default class messages extends React.Component{
  
  showMessage=(type)=>{
    message[type]('调用成功')
  }

  render(){
    return (
      <div>
        <Card title="全局提醒框" className="card_wrapper">
          <Button type="primary" onClick={()=>this.showMessage('success')}>Success</Button>
          <Button type="primary" onClick={()=>this.showMessage('info')}>Info</Button>
          <Button type="primary" onClick={()=>this.showMessage('warning')}>warning</Button>
          <Button type="primary" onClick={()=>this.showMessage('error')}>error</Button>
          <Button type="primary" onClick={()=>this.showMessage('loading')}>Loading</Button>
        </Card>
      </div>
    )
  }
}